<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>入栏分析</title>
		<link href="css/new_file.css" rel="stylesheet" type="text/css">
		<link href="css/mui.min.css" rel="stylesheet" type="text/css">

		<script src="js/mui.min.js"></script>
		<script src="js/testActivityName.js"></script>
		<script src="js/echarts.min.js"></script>
	</head>

	<body style="background: #f5f5f6; padding-bottom: 50px;">
		<div class="head-zhjf">
			<p style="color: white; font-size: 16px;">入栏分析</p>
		</div>
		<div class="sy-tj-tu" style="background: #FFFFFF; height:100%;">
				 	<div id="main" style="height:950px;width: 100%;"></div>
		</div>
		<div class="bottom-cd">
			<div class="bottom-cd-a" onclick="homePage()">
				<img src="images/sy-cd@3x.png" />
				<p >首页</p>
			</div>
			<div class="bottom-cd-a" onclick="FunctionList()">
				<img src="images/gnlb-cd@3x.png" />
				<p>功能列表</p>
			</div>
			<div class="bottom-cd-a" onclick="statisticalAnalysis()">
				<img src="images/tjfx-cd-01@3x.png" />
				<p style="color: #38adff;">入栏分析</p>
			</div>
			<div class="bottom-cd-a" onclick="PersonalCenter()">
				<img src="images/grzx-cd@3x.png" />
				<p>个人中心</p>
			</div>

		</div>
	</body>
	<script>
		var statisticalAnalysisData = JSON.parse(localStorage.getItem('statisticalAnalysisData'));
		console.log(statisticalAnalysisData);
		// 基于准备好的dom，初始化echarts图表
		var myChart = echarts.init(document.getElementById('main'));
		option = {
			legend: {
       				 data:['奶牛走错率'],
       				
   			},
			xAxis: {
				type: 'value', //数据
				position: 'top', //x 轴的位置【top bottom】
				nameRotate: -90, //坐标轴名字旋转，角度值。
				axisLabel: { //坐标轴刻度标签的相关设置。
					rotate: 90 //刻度标签旋转的角度，
				},
				scale: true, //是否是脱离 0 值比例
			},
			yAxis: {
				type: 'category',
				data: statisticalAnalysisData.title,//['00:00', '02:00', '04:00', '06:00', '08:00', '10:00', '12:00','14:00','16:00','18:00','20:00','22:00','24:00'],
				inverse: 'true', //是否是反向坐标轴。
				axisLabel: {
					rotate: -90
				},
			},
			series: [{
				name:'奶牛走错率',
				axisLabel: {
					rotate: -90
				},
				data: statisticalAnalysisData.values,//[820, 932, 901, 934, 1290, 1330, 1320,456,132,147,845,651,387],
				type: 'line',
				smooth: true //是否平滑曲线显示
			}]
		}
		// 为echarts对象加载数据 
		myChart.setOption(option);
	</script>

</html>